import { Component } from '@angular/core';
import {NzButtonComponent} from 'ng-zorro-antd/button';
import {NzSpaceComponent, NzSpaceItemDirective} from 'ng-zorro-antd/space';
import {NzTooltipDirective} from 'ng-zorro-antd/tooltip';
import {EurekaService} from '../services/eureka.service';
import {NzMessageService} from 'ng-zorro-antd/message';
import {NacosService} from '../services/nacos.service';

@Component({
  selector: 'app-nacos',
  standalone: true,
  imports: [
    NzButtonComponent,
    NzSpaceComponent,
    NzTooltipDirective,
    NzSpaceItemDirective
  ],
  templateUrl: './nacos.component.html',
  styleUrl: './nacos.component.css'
})
export class NacosComponent {

  test1_loading= false;
  test2_loading= false;
  test3_loading= false;

  constructor(private nacosService: NacosService,private message: NzMessageService ) {}


  test1() {
    this.test1_loading = true
    this.nacosService.test1().subscribe(res => {
      this.test1_loading = false
      this.message.success("调用成功：" + res)
    })
  }

  test2() {
    this.test2_loading = true
    this.nacosService.test2().subscribe(res => {
      this.test2_loading = false
      this.message.success("调用成功：" + res)
    })
  }

  test3(){
    this.test3_loading = true
    this.nacosService.test3().subscribe(res => {
      this.test3_loading = false
      this.message.success("调用成功：" + res)
    })
  }

}
